package com.android.sha.activity;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.widget.FrameLayout;

import com.android.angle.AngleActivity;
import com.android.angle.FPSCounter;
import com.android.sha.common.MobileCommon;
import com.android.sha.common.MyCommon;
import com.android.sha.ui.GameUI;

public class MainActivity extends AngleActivity{

	private GameUI game;//定义游戏主界面
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyCommon.HEIGHT = MobileCommon.getMobileHeight(getWindowManager());
		MyCommon.WIDTH =  MobileCommon.getMobileWidth(getWindowManager());
		mGLSurfaceView.addObject(new FPSCounter());//添加FPS,显示在logCat中
		game = new GameUI(this);
		setUI(game);//初始化进入的界面
	    FrameLayout frame = new FrameLayout(this);
	    frame.addView(mGLSurfaceView);//添加游戏的surfaceView,angle内部封装的surfaceView
	    setContentView(frame);
	}
}
